Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Managing Spot Lights

QuickDraw 3D provides routines that you can use to create and edit spot lights.

Q3SpotLight_New

You can use the Q3SpotLight_New function to create a new spot light.

TQ3LightObject Q3SpotLight_New (
                     const TQ3SpotLightData *spotLightData);
spotLightData
A pointer to a spot light data structure.

DESCRIPTION

The Q3SpotLight_New function returns, as its function result, a new spot light having the characteristics specified by the spotLightData parameter.

Q3SpotLight_GetCastShadowsState

You can use the Q3SpotLight_GetCastShadowsState function to get the shadow-casting state of a spot light.

TQ3Status Q3SpotLight_GetCastShadowsState (
                     TQ3LightObject light,
                     TQ3Boolean *castsShadows);
light
A spot light object.
castsShadows
On exit, a Boolean value that indicates whether the specified light casts shadows ( kQ3True ) or does not cast shadows ( kQ3False ).

DESCRIPTION

The Q3SpotLight_GetCastShadowsState function returns, in the castsShadows parameter, a Boolean value that indicates whether the light specified by the light parameter casts shadows ( kQ3True ) or does not cast shadows ( kQ3False ).

Q3SpotLight_SetCastShadowsState

You can use the Q3SpotLight_SetCastShadowsState function to set the shadow-casting state of a spot light.

TQ3Status Q3SpotLight_SetCastShadowsState (
                     TQ3LightObject light,
                     TQ3Boolean castsShadows);
light
A spot light object.
castsShadows
A Boolean value that indicates whether the specified light casts shadows ( kQ3True ) or does not cast shadows ( kQ3False ).

DESCRIPTION

The Q3SpotLight_SetCastShadowsState function sets the shadow-casting state of the spot light specified by the light parameter to the Boolean value specified in the castsShadows parameter.

Q3SpotLight_GetAttenuation

You can use the Q3SpotLight_GetAttenuation function to get the attenuation of a spot light.

TQ3Status Q3SpotLight_GetAttenuation (
                     TQ3LightObject light,
                     TQ3AttenuationType *attenuation);
light
A spot light object.
attenuation
On exit, the type of attenuation of the light. See "Light Attenuation Values" for a description of the constants that can be returned in this parameter.

DESCRIPTION

The Q3SpotLight_GetAttenuation function returns, in the attenuation parameter, the current attenuation value of the spot light specified by the light parameter.

Q3SpotLight_SetAttenuation

You can use the Q3SpotLight_SetAttenuation function to set the attenuation of a spot light.

TQ3Status Q3SpotLight_SetAttenuation (
                     TQ3LightObject light,
                     TQ3AttenuationType attenuation);
light
A spot light object.
attenuation
The desired type of attenuation of the light. See "Light Attenuation Values" for a description of the constants that can be passed in this parameter.

DESCRIPTION

The Q3SpotLight_SetAttenuation function sets the attenuation value of the spot light specified by the light parameter to the value passed in the attenuation parameter.

Q3SpotLight_GetLocation

You can use the Q3SpotLight_GetLocation function to get the location of a spot light.

TQ3Status Q3SpotLight_GetLocation (
                     TQ3LightObject light,
                     TQ3Point3D *location);
light
A spot light object.
location
On exit, the location of the spot light, in world coordinates.

DESCRIPTION

The Q3SpotLight_GetLocation function returns, in the location parameter, the current location of the spot light specified by the light parameter.

Q3SpotLight_SetLocation

You can use the Q3SpotLight_SetLocation function to set the location of a spot light.

TQ3Status Q3SpotLight_SetLocation (
                     TQ3LightObject light,
                     const TQ3Point3D *location);
light
A spot light object.
location
The desired location of the spot light, in world coordinates.

DESCRIPTION

The Q3SpotLight_SetLocation function sets the location of the spot light specified by the light parameter to the value passed in the location parameter.

Q3SpotLight_GetDirection

You can use the Q3SpotLight_GetDirection function to get the direction of a spot light.

TQ3Status Q3SpotLight_GetDirection (
                     TQ3LightObject light,
                     TQ3Vector3D *direction);
light
A spot light object.
direction
On exit, the direction of the specified light.

DESCRIPTION

The Q3SpotLight_GetDirection function returns, in the direction parameter, the current direction of the spot light specified by the light parameter.

Q3SpotLight_SetDirection

You can use the Q3SpotLight_SetDirection function to set the direction of a spot light.

TQ3Status Q3SpotLight_SetDirection (
                     TQ3LightObject light,
                     const TQ3Vector3D *direction);
light
A spot light object.
direction
The desired direction of the specified light.

DESCRIPTION

The Q3SpotLight_SetDirection function sets the direction of the spot light specified by the light parameter to the value passed in the direction parameter.

Q3SpotLight_GetHotAngle

You can use the Q3SpotLight_GetHotAngle function to get the hot angle of a spot light.

TQ3Status Q3SpotLight_GetHotAngle (
                     TQ3LightObject light,
                     float *hotAngle);
light
A spot light object.
hotAngle
On exit, the hot angle of the specified light, in radians.

DESCRIPTION

The Q3SpotLight_GetHotAngle function returns, in the hotAngle parameter, the current hot angle of the spot light specified by the light parameter.

Q3SpotLight_SetHotAngle

You can use the Q3SpotLight_SetHotAngle function to set the hot angle of a spot light.

TQ3Status Q3SpotLight_SetHotAngle (
                     TQ3LightObject light,
                     float hotAngle);
light
A spot light object.
hotAngle
The desired hot angle of the specified light, in radians.

DESCRIPTION

The Q3SpotLight_SetHotAngle function sets the hot angle of the spot light specified by the light parameter to the value passed in the hotAngle parameter.

Q3SpotLight_GetOuterAngle

You can use the Q3SpotLight_GetOuterAngle function to get the outer angle of a spot light.

TQ3Status Q3SpotLight_GetOuterAngle (
                     TQ3LightObject light,
                     float *outerAngle);
light
A spot light object.
outerAngle
On exit, the outer angle of the specified light, in radians.

DESCRIPTION

The Q3SpotLight_GetOuterAngle function returns, in the outerAngle parameter, the current outer angle of the spot light specified by the light parameter.

Q3SpotLight_SetOuterAngle

You can use the Q3SpotLight_SetOuterAngle function to set the outer angle of a spot light.

TQ3Status Q3SpotLight_SetOuterAngle (
                     TQ3LightObject light,
                     float outerAngle);
light
A spot light object.
outerAngle
The desired outer angle of the specified light, in radians.

DESCRIPTION

The Q3SpotLight_SetOuterAngle function sets the outer angle of the spot light specified by the light parameter to the value passed in the outerAngle parameter.

Q3SpotLight_GetFallOff

You can use the Q3SpotLight_GetFallOff function to get the fall-off value of a spot light.

TQ3Status Q3SpotLight_GetFallOff (
                     TQ3LightObject light,
                     TQ3FallOffType *fallOff);
light
A spot light object.
fallOff
On exit, the fall-off value of the specified spot light. See "Light Fall-Off Values" for a description of the constants that can be returned in this parameter.

DESCRIPTION

The Q3SpotLight_GetFallOff function returns, in the fallOff parameter, the current fall-off value of the spot light specified by the light parameter.

Q3SpotLight_SetFallOff

You can use the Q3SpotLight_SetFallOff function to set the fall-off value of a spot light.

TQ3Status Q3SpotLight_SetFallOff (
                     TQ3LightObject light,
                     TQ3FallOffType fallOff);
light
A spot light object.
fallOff
The desired fall-off value of the specified spot light. See "Light Fall-Off Values" for a description of the constants that can be passed in this parameter.

DESCRIPTION

The Q3SpotLight_SetFallOff function sets the fall-off value of the spot light specified by the light parameter to the value passed in the fallOff parameter.

Q3SpotLight_GetData

You can use the Q3SpotLight_GetData function to get the data that defines a spot light.

TQ3Status Q3SpotLight_GetData (
                     TQ3LightObject light,
                     TQ3SpotLightData *spotLightData);
light
A spot light object.
spotLightData
On exit, a pointer to a spot light data structure.

DESCRIPTION

The Q3SpotLight_GetData function returns, through the spotLightData parameter, information about the spot light specified by the light parameter. See "Spot Light Data Structure" for a description of a spot light data structure.

Q3SpotLight_SetData

You can use the Q3SpotLight_SetData function to set the data that defines a spot light.

TQ3Status Q3SpotLight_SetData (
                     TQ3LightObject light,
                     const TQ3SpotLightData *spotLightData);
light
A spot light object.
spotLightData
A pointer to a spot light data structure.

DESCRIPTION

The Q3SpotLight_SetData function sets the data associated with the spot light specified by the light parameter to the data specified by the spotLightData parameter.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |